<h4 class="widgettitle nomargin shadowed">Ubah Data Pelajaran</h4>
<div class="widgetcontent bordered shadowed nopadding">
	<form class="stdform stdform2" method="POST" action="">
		<input type="hidden" name="id" value="<?php echo $id ?>" />
		<p>
			<label for="nama_pelajaran">Nama Pelajaran</label>
            <span class="field">
                <select name="kode_pelajaran" class="uniformselect">
				<?php
                    foreach ($r_pelajaran->result() as $v_pelajaran)
                    {
                        if($v_pelajaran->kode_pelajaran == $kode_pelajaran)
                        echo '<option value="' . $v_pelajaran->kode_pelajaran . '" selected >' . $v_pelajaran->nama_pelajaran . '</option>';
                        else
                        echo '<option value="' . $v_pelajaran->kode_pelajaran . '" >' . $v_pelajaran->nama_pelajaran . '</option>';
                    }
                    ?>
				</select>
			</span>
		</p>
		<p>
			<label>Nama Pengajar</label>
            <span class="field">
                <select name="id_guru" class="uniformselect">
                    <?php
                    foreach ($r_guru->result() as $v_guru)
                    {
                        if($v_guru->id == $kode_guru)
                        echo '<option value="' . $v_guru->id . '" selected >' . $v_guru->nama_guru . '</option>';
                        else
                        echo '<option value="' . $v_guru->id . '" >' . $v_guru->nama_guru . '</option>';
                    }
                    ?>
                </select>
			</span>
		</p>
		<p>
			<label for="nilai_min">Nilai Minimal</label>
            <span class="field">
                <input id="nilai_min" type="number" name="nilai_min" class="input-xlarge" min="1" max="100" value="<?php echo $nilai_min ?>" />
			</span>
		</p>
		<p>
			<label for="keterangan">Keterangan</label>
            <span class="field">
                <input id="keterangan" type="text" name="keterangan" class="input-xlarge" maxlength="50" value="<?php echo $keterangan ?>" />
			</span>
		</p>
			
        <p class="stdformbutton">
            <button class="btn btn-primary">Simpan</button>
            <button type="reset" class="btn">Reset</button>
        </p>
	</form>
</div>